package com.yomahub.tlog.id;

import cn.hutool.core.util.IdUtil;
import cn.hutool.setting.Setting;

/**
 * hutools 版本不兼容 重写tlog 项目
 */
public class TLogDefaultIdGenerator extends TLogIdGenerator {
    public TLogDefaultIdGenerator() {
    }

    public String generateTraceId() {
        Setting setting = new Setting("tlog.setting");
        return IdUtil.getSnowflake(setting.getLong("workerId"),setting.getLong("datacenterId")).nextIdStr();
    }

}
